borderlandsfandomcom-20200223-history
Forum:Modding Borderlands 2
There's a severe lack of documentation on modding Borderlands 2. I find this to be a shame with the lively modding community Borderlands originally had. So, why not sponsor change? Do your part, sign up today! Documentation Borderlands 2 packs with an obscure compression algorithm known as Lempel-Ziv-Oberhumer (LZO) . This lossless compression algorithm is renound for its speed. The game itself is based loosely on Unreal Engine 3. The Unreal Engine is just a collection of modern rendering techniques and design tools for primarily industrial use. That being said, the engine itself, and Unreal Script, is a dynamically typed language that compiles into a "cooked" distribution. That distribution is a packaging of game resources in a manner made for that platform such as the XBOX/PS3/PC. Unreal Bytecode is an abstraction layer that makes code you write once, and works on all intended platforms... That being said, one version of the game is just as complete as the others... The mechanisms that process and load the data are the only real differences. These mechanisms are often a hindrance: The save file for xbox360 must be within a certain limitation, this limitation puts a hard cap on BL2's weapon slots for that platform... Rather than write a different game for each platform this limitation is forced on the other platforms too. There is also shader limitations and other restrictions that limit the models and techniques allowed for those distributions. For the most complete game with the highest quality of "cooked" resources, the PC edition is tantamount. *'profile.bin' - It is the account save file, it tracks global things such as golden keys, used shift codes, and the "community" bank claptrap so conveniently gives us. *'save####.sav' - Willow Save Game file, contains character specific data. This is pretty publicly documented by Rick (aka gibbed) . *'.upk' - These files are default containers, part of the Unreal Engine . Upon deflation, these upk files are remarkably similar to other cooked UE3 games. As such, it is possible to create our own mods and to gleam game mechanics from this "bytecode" style engine. profile.bin So, as it appears to be a multi-stage process, I'll be describing the content in a C structure w/labeled frame states. // 32 bit width integers, big-endian formatted struct { char sha120; // sha1 of the deflated member void* deflated; // @see: ProfileDeflated } ProfilePacked; struct { uint size; // unpacked size void* packed; // packed lzo data } ProfileDeflated; struct { // decode the contents of profile and update this entry. } Profile; http://www.fileswap.com/dl/m30m8Xj1Rc/ That PowerShell script should get you to the inflated contents of Profile.bin, the data from there is very limited in documentation, I'll update the structs as I decode the binary. If anyone wants to look for themselves, the current steam edition has GetProfileBin at "0xBB6470". Comments After LZO is a huffman tree, or so I've heard. I'll add it if I get it apart. P.S. you can totally duplicate items and trade specific guns with people (without using the game) by putting them in claptrap storage and sending them the profile.bin Xerxesbeat (talk) 00:37, December 15, 2014 (UTC) You guys definitely should be included in an free editing environment. There was talk of a modding corner for the wiki long ago, not sure what became of that. Just to touch on community: original borderlands was exhausted thoroughly. from pt1 to pt2 to pt2.5 to pt3(willowtree setup) to end user content. That might be why there was more modding talk on the wiki, since there was nothing left to do with the game. There was also people needed to answer questions on if a gun was modded. I think naggy got so good at it, he could just see the parts on a pic and know if it was modded. There is space for guides on main articles and you can publish whatever you want in forums or your user/(namespace). Like I said, there probably should be a modding corner for the purpose of pure information. 00:00, June 2, 2013 (UTC)